package com.atguigu.search;



public class LinearSearch {

    private LinearSearch() {

    }

    public static <T> int Search(T[] arr, T target) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i].equals(target)) {
                return i;
            }
        }
        return -1;
    }

}
